<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    header('Location:'.action('Home\IndexController@getIndex'));
});

Route::get('/swoole', function () {
    return view('swoole');
});

Route::group(['middleware' => 'access'], function () {

    Route::get('testlogin2', 'Home\IndexController@getTestLogin2');
    Route::get('index', 'Home\IndexController@getIndex');
//    Route::get('game/create', 'Home\RoomController@getCreate');
    Route::controller('game', 'Home\RoomController');
    Route::get('token', function(){
//        traceHttp();
        $wechatObj = new \App\Services\Wechat\WechatCallbackapiTest();
        return $wechatObj->valid();
        if (isset($_GET['echostr'])) {
            return $wechatObj->valid();
        }else{
//            return $wechatObj->responseMsg();
            return 'xxxx';
        }
    });

});



/**
 * 前台路由
 */
//require 'Routes/home.php';

/**
 * 会员路由
 */
//require 'Routes/member.php';

/**
 * 后台路由
 */
//require 'Routes/admin.php';











